package com.muyu.danmo.service.impl;


import com.muyu.danmo.domain.DanmoTrainingShoppingPrSp;
import com.muyu.danmo.mapper.DanmoTrainingShoppingPrSpMapper;
import com.muyu.danmo.service.IDanmoTrainingShoppingPrSpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 培训班商品规格Service业务层处理
 * 
 * @author kunzong
 * @date 2024-11-29
 */
@Service
public class DanmoTrainingShoppingPrSpServiceImpl implements IDanmoTrainingShoppingPrSpService
{
    @Autowired
    private DanmoTrainingShoppingPrSpMapper danmoTrainingShoppingPrSpMapper;

    /**
     * 查询培训班商品规格
     * 
     * @param id 培训班商品规格主键
     * @return 培训班商品规格
     */
    @Override
    public DanmoTrainingShoppingPrSp selectDanmoTrainingShoppingPrSpById(Long id)
    {
        return danmoTrainingShoppingPrSpMapper.selectDanmoTrainingShoppingPrSpById(id);
    }

    /**
     * 查询培训班商品规格列表
     * 
     * @param danmoTrainingShoppingPrSp 培训班商品规格
     * @return 培训班商品规格
     */
    @Override
    public List<DanmoTrainingShoppingPrSp> selectDanmoTrainingShoppingPrSpList(DanmoTrainingShoppingPrSp danmoTrainingShoppingPrSp)
    {
        return danmoTrainingShoppingPrSpMapper.selectDanmoTrainingShoppingPrSpList(danmoTrainingShoppingPrSp);
    }

    /**
     * 新增培训班商品规格
     * 
     * @param danmoTrainingShoppingPrSp 培训班商品规格
     * @return 结果
     */
    @Override
    public int insertDanmoTrainingShoppingPrSp(DanmoTrainingShoppingPrSp danmoTrainingShoppingPrSp)
    {
        return danmoTrainingShoppingPrSpMapper.insertDanmoTrainingShoppingPrSp(danmoTrainingShoppingPrSp);
    }

    /**
     * 修改培训班商品规格
     * 
     * @param danmoTrainingShoppingPrSp 培训班商品规格
     * @return 结果
     */
    @Override
    public int updateDanmoTrainingShoppingPrSp(DanmoTrainingShoppingPrSp danmoTrainingShoppingPrSp)
    {
        return danmoTrainingShoppingPrSpMapper.updateDanmoTrainingShoppingPrSp(danmoTrainingShoppingPrSp);
    }

    /**
     * 批量删除培训班商品规格
     * 
     * @param ids 需要删除的培训班商品规格主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingShoppingPrSpByIds(Long[] ids)
    {
        return danmoTrainingShoppingPrSpMapper.deleteDanmoTrainingShoppingPrSpByIds(ids);
    }

    /**
     * 删除培训班商品规格信息
     * 
     * @param id 培训班商品规格主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingShoppingPrSpById(Long id)
    {
        return danmoTrainingShoppingPrSpMapper.deleteDanmoTrainingShoppingPrSpById(id);
    }
}
